<?php
	require (__DIR__.'/daos/RatingsDao.php');
		
	// suche nach einer ID in der Url, wenn keine da ist, nimm den max
	$rates = selectRandomRates(2);
	
	/*$rates = array();
	$rating = new Rating();
	$rating->points = '3';
	$rating->app_name = 'test';
	$rating->comment = 'kommentar';
		
	$rates[] = $rating;*/
	
	echo '<div>';
	
	foreach ($rates as &$value) {
		echo '<table>';
		
		echo '<tr>';
		echo '<td>';
		echo '<p>' . $value->app_name . '</p>';
		echo '</td>';
		echo '</tr>';
		
		echo '<tr>';
		echo '<td>';
		echo 'Points: ' . $value->points;
    	echo '</td>';
    	echo '</tr>';

    	echo '<tr>';
    	echo '<td>';
    	echo $value->comment;
    	echo '</td>';
    	echo '</tr>';
    	
    	echo '</table>';
	}
	
	echo '</div>';
	
?>